$(document).ready(function(){
		
		$('#minicontent').keyup(function() {
			checkLength(this);
		});
		
		$('#minisubmit').click(function(){checkNull(this);});
		
		$(".ajaxdel").each(function(){
			$(this).bind("click",function(){del(this);});
		});
});

function checkLength(which) {  
	var maxChars = 140;  
	if (which.value.length > maxChars)  
		which.value = which.value.substring(0,maxChars);  
	var curr = maxChars - which.value.length;  
	$('#mini_word').html("还可输入 <b>"+curr.toString()+"</b> 字");  
}  

function checkNull(obj){
	if($.trim($('#minicontent').val()) == ""){
		$('#minicontent').focus();
		msg(obj,"内容不能为空！");
		return false;
	}else{
		//$.post(APP+"/User/saveMini", {content: $('#minicontent').val()} );
	}
}